import socket

'''创建tcp套接字'''
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

local_address = ('', 8085)
s.bind(local_address)

rec_data = s.recvfrom(1024)

print(rec_data[0].decode('gbk'))

'''关闭套接字'''
s.close()
